****************************************************
Scripts done by: Francois-G. Auclair aka TheKGBspy
e-mail: Boris_the_invincible@hotmail.com
e-mail2: TheKGBspy@timeofwar.com
****************************************************

****************************************************
Script Name:	Ra2Ven_MirageTank

Description:	Script that allow to turn the tank invisible, 
				and showing a model instead while keeping original
				tank worldbox. It turn the tank visible while
				moving and destroy the attached object.

Attributes:		Tree1_Preset:String; The tree object #1
				Tree2_Preset:String; The tree object #2
				Tree3_Preset:String; The tree object #3
				Tree4_Preset:String; The tree object #4
				Explosion_Preset:String; Explosion used to destroy the object when moving.
				Time:float; The "Cloak" transition delay.
				TimerNumber:int; Set an unique # if the object as more than one script using a timer.


Additional notes: If you set up all the 4 tree preset value to "none" there will be a problem 
				  so you must at least set up one object to the tank to hide into.
****************************************************

****************************************************
Script Name:	Ra2Ven_VehicleFalling 

Description:	Damage givien to falling vehicles.

Attributes:			ZValueBeforeStartFallingMode:int; This is basicly the distance in units on the Z axis, its needed to put the
								vehicle in the falling mode.
				ImpactExplosion_Preset:string; Used to impact ambient tank, or the falling tank and alow a "clonk" sound on impact. 
				Warhead:string; Warhead used to dommage vehicles.
				DommageMultiplier=10:int; Used as a Dommage multiplier
				Time=1:float; How accurate is the scripts(x<1 mean more accurate)
				TimerNumber:int; Set an unique # if the object as more than one script using a timer.



Additional notes: The equation used on falling damage is: Value = (fabs(position.Z-zpos)/2.5)*DommageMultiplier)
The script will look if the vehicle is falling on th Z axis from a big distance(if lastZvalue - currentZ >= ZValueBeforeStartFallingMode).
Once the vehicle start in "falling mode" it keep the Z coord. it will apply dommage until the Z movement is
suddently stopped. Then it will apply damage.

The difference between ImpactExplosion_Preset and Warhead with DommageMultiplier, is the Damage value od the impact explosion
has a fix value setted by the user. The combination of  Warhead with DommageMultiplier allow to compute the damage given on
impact: More the vehicle was falling, more he get hurted. 
****************************************************

****************************************************
Script Name:	Ra2Ven_DemoTruck

Description:	Script that will make a functional demo truck.. even if FF is off.

Attributes:		FFFDommage:float; Dommage given to destroy the vehicle
				FFFWh:string; Wh used to  destroy the vehicle
				Demo_Explosion:string: Explosion to do when the vehicle is being killed by anoyone else than the driver.

Additional notes: First to make the vehicle work, dont put an Explosion_Preset to the vehicle.
That mean the option, in the setting Tab of lvledit, should be blank. The Destroy/explosion animation
on the vehicle death should be set in the script. The primary weapon should be the demo charge... this
work same way as SSM does work, but the script look when the vehicle is beign damaged,
if its the driver, the vehicle grant the Dommage set in the script using the WH set in the script and
dont do the Demo_explosion. The Demo_explosion is used when the vehicle is killed by someone who is
not the driver.
****************************************************

****************************************************
Script Name:	Ra2Ven_Deployable_Vehicle

Description:	Script used to allow deploy abbility to a vehicle.

Attributes:		Animation_Preset:string; Preset name of the Animation (like a standard vehicle.. but 
					with anim.. and having the script Ra2Ven_Deploy_Animation attached to that anim object)
				oldTnk_Wh:string; Warhead used to destroy the deployable vehicle.
				oldTnk_Dommage:float; Dommage to do to destroy the vehicle.
				Explosion_preset:string: This is used as destroy animation.


Additional notes: The Explosion_preset is used as destruction animation. its set in the script instead
of the lvledit because when being destroyed for deploy animation, the tank may have an explosion
animation.. wich may look odd beause you are deploying and not destroying the tank. Setting the explosion_preset
allow you to use the Destruction_anim only when the tank is destroyed... not while beign deployed.
The Deploy logic, using self attack work as same way as the reborn one.


For best result, your deploy/deploy animation/deployed/undeploy animation should have all the origin setted at the same position in the model,
and make sure that every woldbox of each models has same size.
If you deploy any ground unit to another ground units, make sure the deployable object origin is at Z value from the ground
and all model will have the same origin height from the ground. or else it might cause some bug.

And what new to this script from reborn one? you dont really need to create new WH or new armor in the armor ini to deploy a tank.
That version also fix an issue on uneven terrain, where vehicle could be stuck on the terrain when deploying.
It also fix a minor issue, when transfering the Heatlh and the Sheild value. Now it send the Ratio, That mean
The Normal vehicle has a max of 300 of sheild and he currently has 150 of sheild. The deployed Vehicle have
a max of 500. the sheild value will be 250. ((150/300)*500 = 250).
****************************************************

****************************************************
Script Name:	Ra2Ven_Deploy_Animation

Description:	Attach that script to an object that will be a Deploy animation.

Attributes:		Deployed_Tank_Preset:string; Preset name of the deployed tank.
				oldTnk_Wh:string; Warhead used to destroy the animation.
				oldTnk_Dommage:float; Dommage to do to destroy the animation.
				Animation_Time:float; Time before destroying the animation to spawn the deployed tank.
				TimerNumber:int; Set an unique # if the object as more than one script using a timer.


Additional notes:
****************************************************
//////////////////////////////////////////////////////////////// update july 25 2004 -----v
****************************************************
Script Name:	Ra2Ven_RandomTree

Description:	You want to add spicy feature on your map? If yes, this script is for you. Attach that script to a dave arrow,
		set 4 different object wich is a tree model. Each time the map will load, there will be a different tree, or
		no tree. You can use other than just trees.. ex: rock.. scrapped vehicles.. etc.

Attributes:		Tree1_Preset:String; The tree object #1
			Tree2_Preset:String; The tree object #2
			Tree3_Preset:String; The tree object #3
			Tree4_Preset:String; The tree object #4


Additional notes: Thje object is spawned at the origin of the object that is used as Random tree generator.
****************************************************

****************************************************
Script Name:	Ra2Ven_TurretSoundObj

Description:	Attach that script to an invisible object that will be used to detect when the turret rotate
		You can use a dave arrow type object, but uncheck IsEditorObject, and check IsInvisible. Set
		his armor  and skin type to  blamo. The explosion is used to destroy the object.. so use the
		Blamo Killer Warhead for your explosion.

Attributes:		Rotate_3dSound:string: Preset Name of the 3dobject sound to play.
			Explosion_Preset:string; Used to destroy object.
			Time=0.5:float; i suggest to set it half of the wav_lenght value for a better result
			TimerNumber1:int; Set an unique # if the object as more than one script using a timer.
			Wav_Length:float; Set in float, the length of the wav file used to make the rotate sound.
			TimerNumber2:int; Set an unique # if the object as more than one script using a timer.


Additional notes:
****************************************************

****************************************************
Script Name:	Ra2Ven_TurretSound

Description:	Attach that script to a tank where you want it to have a rotation turret.

Attributes:		TurretSoundObj:string; Preset name of the invisible object having the script TurretSoundObj.

Additional notes:
****************************************************

****************************************************
Script Name:	Ra2Ven_OccupentWeapon

Description:	Attach that script to a vehicle that will change his weapon when a certain unit get in.

			Character1:string; Character preset name that will use powerup1 and weapon1
			PowerUp1:string; Powerup given to the tank having the new weapon1 
			Weapon1:string; Weapon name set in the powerup1 goes in there. It used for the selection of the weapon.
			Character2:string; Character preset name that will use powerup2 and weapon2
			PowerUp2:string; Powerup given to the tank having the new weapon2 
			Weapon2:string; Weapon name set in the powerup1 goes in there. It used for the selection of the weapon.
			Character3:string; Character preset name that will use powerup3 and weapon3
			PowerUp3:string; Powerup given to the tank having the new weapon3 
			Weapon3:string; Weapon name set in the powerup3 goes in there. It used for the selection of the weapon.
			Character4:string; Character preset name that will use powerup4 and weapon4
			PowerUp4:string; Powerup given to the tank having the new weapon4 
			Weapon4:string; Weapon name set in the powerup4 goes in there. It used for the selection of the weapon.
			DefPowerUp:string; Default power up given when the chracter name is not listed above.
			DefWeapon:string; The name of the weapon set in the Default powerup.

Additional notes:
****************************************************